import React,{Component} from 'react';
import {Platform, StyleSheet,ScrollView,Text, View,TouchableOpacity, Alert,Image, TextInput } from 'react-native';

export default class attendance extends Component{
    static navigationOptions = {
        headerStyle:{
            backgroundColor:'#d04542',
            height:50,
        },
        headerTintColor:'white',
    };
	render(){
		return(
		    <ScrollView style={styles.ScrollView}>
		        <View style={styles.container}>
		        	<View style={styles.inputs}>
		        		<Text style={styles.title}>标题:</Text>
		        		<TextInput style={styles.inputa} />
		        	</View>
		        	<View>
		        		<Text style={styles.titles}>内容:</Text>
		        		<TextInput multiline={true} style={styles.textarea} />
		        	</View>
		        	<View style={styles.upload}>
		        		<Text style={styles.uploadTitle}>上传图片:</Text>
		        		<TouchableOpacity style={styles.uploadButton}>
				      		<Text style={styles.btn}>
				      		<Image style={styles.imageStyle} source={require('../img/university/add.png')}></Image>
				      		上传图片</Text>
				    	</TouchableOpacity>
				    	<Text style={{flex:1}}></Text>
		        	</View>
		    	</View>
		    	<View style={{padding:10}}>
			        <TouchableOpacity style={{height:40}}>
			      		<Text style={styles.btns}>下一步</Text>
			    	</TouchableOpacity>
		    	</View>
         	</ScrollView>
		);
	}
}
const styles = StyleSheet.create({
	btns:{
		width:"100%",backgroundColor:'#D04542',borderRadius:2,
	  	lineHeight: 40 ,color: 'white',textAlign: 'center',
	},
	imageStyle:{
        height:20, width:20,
	},
	btn:{
	  	fontSize: 17,lineHeight: 40 ,textAlign: 'center',color:'white',
	},
	uploadTitle:{
		flex:1,fontSize: 17,lineHeight: 40,fontWeight:"400",marginLeft:10,
	},
	uploadButton:{
		flex:2,backgroundColor:'#21AB38',borderRadius:2,
	},
	upload:{
		flexDirection:'row',paddingTop:10,height: 50,
	},
	textarea:{
		height: 150,borderColor: '#D4D4D4', borderWidth: 1,borderRadius:3,textAlignVertical: 'top',
	},
	titles:{
		flex:1,fontSize: 17,lineHeight: 40,fontWeight:"400",marginLeft:10,
	},
	title:{
		flex:1,fontSize: 17,lineHeight: 50,fontWeight:"400",textAlign: 'center',
	},
	inputa:{
		flex:5,fontSize: 17,
	},
	inputs:{
		height:50,flexDirection: 'row',borderBottomWidth:1,borderBottomColor: "#D4D4D4"
	},
	container:{
		margin:10,
	},
});
